SaveData["episode"] = SaveData["episode"] or {}

--------------------------------------------------
-- Level code
-- Created 9:52 2017-2-24
--------------------------------------------------

-- Run code on level start
function onStart()
	ffc.disablenpccointable = true
end

-- Run code every frame (~1/65 second)
-- (code will be executed before game logic will be processed)
function onTick()
	if Level.winState() > 0 then
		globalsave.CompleteSML = true
	end
end

-- Run code when internal event of the SMBX Engine has been triggered
-- eventName - name of triggered event
function onEvent(eventName)
	if eventName == "Bonus Bell" then
		Misc.npcToCoins()	
	end
end